<form action="<?php echo $form->getObject()->isNew() ?
        url_for('create_message', array('topic_id' => $ktd_topic->getId()))
        :
        url_for('update_message', array('id' => $ktd_message->getId())) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>

<?php foreach($form as $widget): ?>
    <?php if($widget->getName() != "_csrf_token") : ?>
        <?php echo $widget->renderLabel() ?>
        <div class="in">
            <?php echo $widget->render() ?>
            <?php if($widget->renderError() != NULL): ?>
            <div class="ui-state-error">
                <?php echo $widget->renderError() ?>
            </div>
            <?php endif; ?>
        </div>
    <?php endif; ?>
<?php endforeach; ?>

        <br/>
 <input class="btn success"type="submit" value="Editer" />
</form>
